!function e(t, i, n) {
    function r(u, s) {
        if (!i[u]) {
            if (!t[u]) {
                var a = "function" == typeof require && require;
                if (!s && a) return a(u, !0);
                if (o) return o(u, !0);
                var c = new Error("Cannot find module '" + u + "'");
                throw c.code = "MODULE_NOT_FOUND", c
            }
            var d = i[u] = {exports: {}};
            t[u][0].call(d.exports, (function (e) {
                return r(t[u][1][e] || e)
            }), d, d.exports, e, t, i, n)
        }
        return i[u].exports
    }

    for (var o = "function" == typeof require && require, u = 0; u < n.length; u++) r(n[u]);
    return r
}({
    1: [function (e, t, i) {
        "use strict";
        var n = null;

        function r(e, t, i) {
            var r = $(".mce-tinymce");
            clearTimeout(n), $("#notice").remove(), r.append('<div id="notice"><div class="notice-bg"></div><div class="notice-wrap"><div class="notice-inner notice-' + e + '">' + t + "</div></div></div>"), i && (n = setTimeout((function () {
                $("#notice").remove()
            }), i))
        }

        tinymce.init({
            selector: "#editor",
            language: "zh_CN",
            plugins: "lists img codesample paste autoresize",
            menubar: !1,
            toolbar: "bold italic underline blockquote codesample bullist numlist img"
        }), $(document).ready((function () {
            var e = 0;
            var tmpUrl=$("#question-form").attr('action');
            $("#question-form .btn-post").on('click',function(){

                tinyMCE.triggerSave();
                var t = $("input[name=title]").val(), i = $("[name=category]").val(), n = $("#editor").val();
                return t ? i ? $.trim(n) ? (e = 1, $.ajax({
                    url: tmpUrl,
                    data: $("#question-form").serialize(),
                    type: "POST",
                    dataType: "json",
                    success: function (t) {
                        if(t.resp_code=='0000'){
                            r(1, "提交成功!", 2000)
                            alert("提交成功!");
                            setTimeout(function(){
                                location.reload();
                            },2000)
                        }else{
                            alert(t.msg);
                        }

                    },
                    error: function (t) {
                        e = 0, r(0, "\u63d0\u4ea4\u5931\u8d25\uff0c\u8bf7\u7a0d\u540e\u518d\u8bd5\uff01", 1200)
                    }
                }), !1) : (r(0, "\u5185\u5bb9\u4e0d\u80fd\u4e3a\u7a7a", 1200), !1) : (r(0, "\u5206\u7c7b\u4e0d\u80fd\u4e3a\u7a7a", 1200), !1) : (r(0, "\u6807\u9898\u4e0d\u80fd\u4e3a\u7a7a", 1200), !1)
            })

        }))
    }, {}]
}, {}, [1]);